const common = require("./webpack.common")
const { merge } = require("webpack-merge")
const path = require("path")
const ESLintPlugin = require('eslint-webpack-plugin')

module.exports = merge(common, {
    mode: "development",
    target: "web",
    devtool: "eval-cheap-source-map",
    devServer: {
        hotOnly: true,
        // 制定额外的静态资源路径
        contentBase: path.join(__dirname, 'public'),
    },
    plugins: [
        new ESLintPlugin({
            fix: true
        })
    ]
})